//
//  MsgTimeMarkerCell.swift
//  swiftim
//
//  Created by yangjian on 2023/6/13.
//

import Foundation

class MsgTimeMarkerCell : MsgBaseCell {
    
    let label = UILabel()
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.configUserInfoViews()
    }
    required init?(coder: NSCoder) {
        super.init(coder: coder)
    }
    
    func configUserInfoViews(){
        //添加视图
        contentView.addSubview(label)
        //设置约束
        label.snp.makeConstraints { make in
            make.center.equalTo(self.contentView)
        }
        label.textColor = UIColor.darkGray
    }
    override func bindFromModel(_ model : MsgCellBaseModel){
        super.bindFromModel(model)
//        label.attributedText = model.show_text
        label.attributedText = attributedString(string: timeStampToCurrennTime(timestamp: model.timestamp), font: MsgTableViewConfig.share.timeFont, color: UIColor.gray)
        
    }
    
}
